<?php
class BaseAction extends Action {
	var $uid;	//当前登陆的用户ID = uid
	var $cid;	//当前游戏角色ID = cid

	/**
	 * 验证用户是否在线
	 *
	 */
	protected  function _initialize(){
		$this->uid = Session::get('uid');
		$this->cid = Session::get('cid');
		if(empty($this->uid)){
			$this->redirect("checklogin","Public");
			exit;
		}
		if(empty($this->cid)){
			$this->redirect("charcreate","Public");
			exit;
		}
		parent::_initialize();
	}

	/**
	 * 消息显示
	 *
	 * @param string $message
	 */
	protected function showmessage(string $message){
		header("Content-Type:text/html; charset=utf-8");
        exit($message.' [ <A HREF="javascript:history.back()">返 回</A> ]');
	}

	public function zhuangbei(string $zhuangbei){
		$zhuangbei = unserialize($zhuangbei);

	}
}
?>